package com.kla.power.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kla.power.vo.BaseEntity;

import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 发电站表
 * </p>
 * @author WuZH
 * @since 2024-06-02
 */
@Getter
@Setter
@TableName ("station_info")
@ApiModel (value = "StationEntity对象", description = "发电站表")
public class StationEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty ("发电站Id")
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    @ApiModelProperty ("发电站名称")
    @TableField ("stationName")
    private String stationName;

    @ApiModelProperty ("发电站封面图")
    @TableField ("coverImg")
    private String coverImg;

    @ApiModelProperty ("国家Id")
    @TableField ("countryId")
    private String countryId;

    @ApiModelProperty ("所在省份")
    @TableField ("provinceId")
    private String provinceId;

    @ApiModelProperty ("所在城市")
    @TableField ("cityId")
    private String cityId;

    @ApiModelProperty ("所在区县")
    @TableField ("countyId")
    private String countyId;

    @ApiModelProperty ("具体位置")
    @TableField ("address")
    private String address;

    @ApiModelProperty ("地图经度")
    @TableField ("longitude")
    private String longitude;

    @ApiModelProperty ("地图纬度")
    @TableField ("latitude")
    private String latitude;

    @ApiModelProperty ("发电站时区")
    @TableField ("timeZone")
    private String timeZone;

    @ApiModelProperty ("系统类型,1光伏+电网,2光伏+电网+用电,3光伏+电网+用电+储能")
    @TableField ("systemType")
    private Integer systemType;

    @ApiModelProperty ("发电站类型,1分布式户用,2分布式商用,3分布式工业,4地面电站")
    @TableField ("stationType")
    private Integer stationType;

    @ApiModelProperty ("装机容量(kWp)")
    @TableField ("capacity")
    private String capacity;

    @ApiModelProperty ("并网状态,1已并网,0未并网")
    @TableField ("mergeState")
    private Integer mergeState;

    @ApiModelProperty ("并网日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField ("mergeTime")
    private Date mergeTime;

    @ApiModelProperty ("计划自发用电率")
    @TableField ("planUseRate")
    private String planUseRate;

    @ApiModelProperty ("收益信息：货币单位")
    @TableField ("currencyUnit")
    private String currencyUnit;

    @ApiModelProperty ("度电收益：单价")
    @TableField ("unitPrice")
    private String unitPrice;

    @ApiModelProperty ("补贴收益(元/kWh)")
    @TableField ("subsidy")
    private String subsidy;

    @ApiModelProperty ("总成本")
    @TableField ("cost")
    private String cost;

    @ApiModelProperty ("日还款")
    @TableField ("dayRepayment")
    private String dayRepayment;

    @ApiModelProperty ("业主姓名")
    @TableField ("merchantName")
    private String merchantName;

    @ApiModelProperty ("业主手机")
    @TableField ("telPhone")
    private String telPhone;

    @ApiModelProperty ("业主工作单位")
    @TableField ("company")
    private String company;

    @ApiModelProperty ("商户Id")
    @TableField ("merchantId")
    private String merchantId;

    @ApiModelProperty ("新建用户Id")
    @TableField ("userId")
    private String userId;

    @ApiModelProperty ("父电站ID")
    @TableField ("parentId")
    private String parentId;

    @ApiModelProperty ("发电站类型，1：发电站；2：子系统（组）")
    @TableField ("type")
    private Integer type;

    @ApiModelProperty ("计划发电量")
    @TableField ("planPower")
    private String planPower;

    @ApiModelProperty ("电站管理员姓名")
    @TableField ("stationAdmin")
    private String stationAdmin;

    @ApiModelProperty ("电站管理员电话")
    @TableField ("adminTel")
    private String adminTel;

    @ApiModelProperty ("建站时间")
    @TableField ("createTime")
    private Date createTime;

    @TableField ("changeTime")
    private Date changeTime;

    @TableField ("isUsed")
    private Integer isUsed;



    @TableField(exist = false)
    private Integer alarmFlag = 0; // 是否有报警，0表示无报警

    @TableField(exist = false)
    private String todayEnergy;

    @TableField(exist = false)
    private Double totaEnergy;

    @TableField(exist = false)
    private String gridPower;

    @TableField(exist = false)
    private Integer timeType; // 统计数据看板总的发电历史，传递的查询时间类型1月 2年

    @TableField(exist = false)
    private String fullHour; // 满发小时

    @TableField(exist = false)
    private String avgActivePower = "0.0"; // 功率归一化

    @TableField(exist = false)
    private Double power; // 功率求和

    @TableField(exist = false)
    private List<FileEntity> fileEntities; // 功率求和

}
